define([
    //  Dependancy scripts
    // ---------------------------
    'jquery',
    'underscore',
    'backbone',
    
    //  App scripts
    // ---------------------------
    'app/appRouter',
    'app/collections/days',
    'app/collection_views/days',
    'app/views/day',
    'app/models/day',
    'app/global'

    //  Template scripts
    // ---------------------------
    

], function( $, _, Backbone, AppRoute, DaysCollection, DaysView, DayView, DayModel, appNamespace) {
    
    'use strict';

    var AppView = Backbone.View.extend(
    {    
        el  :  "#app-view",

        viewCollection  : {},

        initialize : function() 
        {
            this.render();

            //  Init App Router
            // ---------------------------
            appNamespace.Route = new AppRoute();
            Backbone.history.start();
        },

        render : function() 
        {
            // add new View to page collection View
            this.viewCollection['dayView'] = new DaysView();
            this.$el.html(this.viewCollection['dayView'].render().el);
        }
    }); 

    return AppView;
});